<?php
session_start();
require_once("../config.php");
require_once($CONF['root.dir']."database.php");
require_once($CONF['root.dir']."Modules/tabelClass.php");
  
$tabelClass = new tabelClass();
$tabelClass->connection = $conn;
$tabelClass->widthno='3%';

$arrayHeader = array("Nama","Tempat/Tgl Lahir","Alamat","Telepon","Jns.Kelamin","Status","Pendidikan","IPK");
$arrayAlign = array("","","","","center","center","","center");
$arrayWidth = array("20%","13%","20%","8%","10%","8%","10%","8%");

$SQL="SELECT nama,CONCAT(tmp_lahir,', ',DATE_FORMAT(tgl_lahir,'%d-%m-%Y'))lahir,alamat,telepon,if(jns_kelamin='L','Pria','Wanita'),STATUS,
	  CONCAT(pendidikan,',',jurusan) pendidikan,ipk,id_pelamar FROM tbllamaran where id_pelamar='".$_GET["data"]."'";

$tabelClass->sql = $SQL;
$tabelClass->index = $index;
$tabelClass->dataPerPage = 10;

$tabelClass->field = $arrayHeader;
$tabelClass->alignKolom = $arrayAlign;
$tabelClass->widthKolom = $arrayWidth;
$tabelClass->border = "0";
$tabelClass->cellpadding = "1";
$tabelClass->width = "100%";	
$content .= $tabelClass->drawTabel();	

//==============================================================
// Generate PDF
//==============================================================

require_once($CONF['root.dir']."Library/Pdf/mpdf.php");

$pagesize=array('379,98', '129,96');

$mpdf=new mPDF('',$pagesize); 

$stylesheet = file_get_contents('../Style/tableClass.css');

$mpdf->WriteHTML($stylesheet,1);

$mpdf->WriteHTML($content);

$mpdf->Output();

exit;

//==============================================================
//==============================================================
//==============================================================


?>
